package com.bwstudio.demo.auth.controller;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.bwstudio.common.unires.annotation.ResponseResult;

@ResponseResult
@RestController
@RequestMapping(value = "/hello", produces = MediaType.APPLICATION_JSON_VALUE)
public class HelloController {

	@GetMapping("/sayHello")
	public String sayHello(String name) {
		return "Hello, " + name;
	}

	@GetMapping("/sayHi")
	public String sayHi(@RequestHeader("Authorization-UserName") String username) {
		return username;
	}
}
